package com.itheima.constructor;

public class Student {
    public String name;
    //构造方法(构造器) 构造方法没有返回值类型，方法名与类名相同
    public Student(){
        System.out.println("无参构造方法");
    }
    public Student(String name){
        this.name = name;
        System.out.println("有参构造方法");
    }
}
